package com.ss.android.article.browser.website;

import com.google.gson.Gson;
import com.ss.android.browser.base.wrapper.a.BrowserSharedPreferencesWrapper;
import com.ss.android.browser.base.wrapper.net.BaseNetBean;
import com.ss.android.browser.base.wrapper.net.NavigationCallback;

final class e extends NavigationCallback {
    private final com.ss.android.article.browser.website.a a;

    e(com.ss.android.article.browser.website.a arg1) {
        this.a = arg1;

    }

    public final void a(BaseNetBean arg4) {
        if(((WebsiteBean)arg4).navigation == null || (((WebsiteBean)arg4).navigation.isEmpty())) {
            com.ss.android.article.browser.website.a.a(this.a, android.support.design.a.getWebsiteNavigationBeanList());
        }
        else {
            com.ss.android.article.browser.website.a.a(this.a, ((WebsiteBean)arg4).navigation);
            BrowserSharedPreferencesWrapper.putString("website_list", new Gson().toJson(com.ss.android.article.browser.website.a.a(this.a)));
        }

        this.a.w();
    }

    public final void b(Throwable arg3) {
        com.ss.android.article.browser.website.a.a(this.a, android.support.design.a.getWebsiteNavigationBeanList());
        this.a.w();
        android.support.design.a.d(arg3.getMessage());
    }
}

